package com.fypg.module.medical.dal.mysql.registerorderrefund;

import com.fypg.framework.common.pojo.PageResult;
import com.fypg.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.fypg.framework.mybatis.core.mapper.BaseMapperX;
import com.fypg.module.medical.dal.dataobject.outpatientorderdetail.registerorderrefund.RegisterOrderRefundDO;
import org.apache.ibatis.annotations.Mapper;
import com.fypg.module.medical.controller.admin.registerorderrefund.vo.*;

/**
 * 挂号订单退款信息 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface RegisterOrderRefundMapper extends BaseMapperX<RegisterOrderRefundDO> {

    default PageResult<RegisterOrderRefundDO> selectPage(RegisterOrderRefundPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<RegisterOrderRefundDO>()
                .eqIfPresent(RegisterOrderRefundDO::getRegisterOrderRefundId, reqVO.getRegisterOrderRefundId())
                .eqIfPresent(RegisterOrderRefundDO::getRegisterOrderId, reqVO.getRegisterOrderId())
                .eqIfPresent(RegisterOrderRefundDO::getPlatformRefundOrderNo, reqVO.getPlatformRefundOrderNo())
                .eqIfPresent(RegisterOrderRefundDO::getPayRefundTradeNo, reqVO.getPayRefundTradeNo())
                .eqIfPresent(RegisterOrderRefundDO::getHisRefundOrderNo, reqVO.getHisRefundOrderNo())
                .eqIfPresent(RegisterOrderRefundDO::getRefundReason, reqVO.getRefundReason())
                .eqIfPresent(RegisterOrderRefundDO::getRefundFee, reqVO.getRefundFee())
                .betweenIfPresent(RegisterOrderRefundDO::getRefundTime, reqVO.getRefundTime())
                .eqIfPresent(RegisterOrderRefundDO::getRefundStatus, reqVO.getRefundStatus())
                .eqIfPresent(RegisterOrderRefundDO::getRefundChannel, reqVO.getRefundChannel())
                .eqIfPresent(RegisterOrderRefundDO::getExtendData, reqVO.getExtendData())
                .eqIfPresent(RegisterOrderRefundDO::getSortCode, reqVO.getSortCode())
                .eqIfPresent(RegisterOrderRefundDO::getEnabledMark, reqVO.getEnabledMark())
                .eqIfPresent(RegisterOrderRefundDO::getDescription, reqVO.getDescription())
                .betweenIfPresent(RegisterOrderRefundDO::getCreateTime, reqVO.getCreateTime())
                .eqIfPresent(RegisterOrderRefundDO::getCreateUserId, reqVO.getCreateUserId())
                .likeIfPresent(RegisterOrderRefundDO::getCreateUserName, reqVO.getCreateUserName())
                .betweenIfPresent(RegisterOrderRefundDO::getModifyTime, reqVO.getModifyTime())
                .eqIfPresent(RegisterOrderRefundDO::getModifyUserId, reqVO.getModifyUserId())
                .likeIfPresent(RegisterOrderRefundDO::getModifyUserName, reqVO.getModifyUserName())
                .eqIfPresent(RegisterOrderRefundDO::getDeleteUserId, reqVO.getDeleteUserId())
                .likeIfPresent(RegisterOrderRefundDO::getDeleteUserName, reqVO.getDeleteUserName())
                .betweenIfPresent(RegisterOrderRefundDO::getDeleteTime, reqVO.getDeleteTime())
                .eqIfPresent(RegisterOrderRefundDO::getDeleteMark, reqVO.getDeleteMark())
                .eqIfPresent(RegisterOrderRefundDO::getRemark, reqVO.getRemark())
                .eqIfPresent(RegisterOrderRefundDO::getRemoveMark, reqVO.getRemoveMark())
                .orderByDesc(RegisterOrderRefundDO::getId));
    }

}
